USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0013_ACTUALIZA_FECHA]    Script Date: 11/24/2011 11:37:29 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID('WASP_M0013_ACTUALIZA_FECHA') AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[WASP_M0013_ACTUALIZA_FECHA]
GO

USE [BMIG_Mensual_POST_CADENA]
GO

/****** Object:  StoredProcedure [dbo].[WASP_M0013_ACTUALIZA_FECHA]    Script Date: 11/24/2011 11:37:29 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE PROCEDURE [dbo].[WASP_M0013_ACTUALIZA_FECHA] (@FECHA_INICIO CHAR(8)) AS
BEGIN
    update dbo.cabecera_producion_prueba
    set 
    	PeriodoProduccion = substring(cast(@FECHA_INICIO as varchar),1,6),
    	FechaEnvio = @FECHA_INICIO
END	
GO


